﻿using Dapper;
using MySqlConnector;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;

namespace Cloud.Core.Dapper
{
    public class MysqlDapperReader
    {
        public static List<T> SqlQuery<T>(DbConnection conn, string sql, object param = null) where T : class
        {
            MySqlConnection con = conn as MySqlConnection;
            var list = con.Query<T>(sql, param);
            return list.AsList();

        }
    }
}
